package com.back.controller.mqdemo;


import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
public class C {

    @RabbitListener(queues = "queue01")
    public void receive(String message) {
        System.out.println("C收到消息：" + message);
    }
}
